package com.prolestar.web.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zhihuixingguang.login.LoginConfig;
import com.zhihuixingguang.login.LoginService;
import com.zhihuixingguang.login.LoginServiceImpl;


@ConfigurationProperties(prefix = "zhxg")
@Configuration
public class ZhihuixingguangConfig {

	private String appid;
	private String appsecret;
	private String systemid;
	private String visitUrl;

	@Bean(name = "zhxgLoginService")
	public LoginService loginService() {
		LoginService l = new LoginServiceImpl(new LoginConfig(appid,appsecret,systemid,visitUrl));
		return l;
	}

	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	public String getAppsecret() {
		return appsecret;
	}

	public void setAppsecret(String appsecret) {
		this.appsecret = appsecret;
	}

	public String getSystemid() {
		return systemid;
	}

	public void setSystemid(String systemid) {
		this.systemid = systemid;
	}

	public String getVisitUrl() {
		return visitUrl;
	}

	public void setVisitUrl(String visitUrl) {
		this.visitUrl = visitUrl;
	}



}
